package com.eliauk.demo.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.eliauk.demo.utils.excel.converter.SexConverter;
import com.eliauk.demo.utils.excel.converter.UsernameConverter;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Getter
@Setter
@EqualsAndHashCode
public class User2 implements Serializable {
    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty(value = "id")
    private Integer id;

    @ExcelProperty(value = "昵称",converter = UsernameConverter.class)
    private String username;

    @ExcelProperty(value = "生日")
    private Date birthday;

    @ExcelProperty(value = "身高")
    private String height;

    @ExcelProperty(value = "性别",converter = SexConverter.class)
    private Byte sex;

    @NumberFormat("#%")
    @ExcelProperty(value = "生命值")
    private String life;
}
